fix(blueprints): make system flows validate on Kestra 2.0 - #247
Draft
Ben8t wants to merge 1 commit into
Draft
Conversation
Validated all 22 system-namespace blueprints against Kestra EE v2.0.0-rc1 and fixed every validation error: - Replace removed Flow trigger 'conditions' with 'states' (and 'when' namespace scoping where the blueprint previously used ExecutionNamespace with prefix matching) - Remove 'forced' from pluginDefaults (field removed from FlowPluginDefault in 2.0) - Replace removed 'expiredOnly' property on PurgeKV with the new 'behavior' object - Replace removed io.kestra.plugin.core.flow.ForEach with io.kestra.plugin.core.flow.Loop - Use secret() expressions for secret-annotated properties (username, apiKey, token) that triggered plain-text secret validation warnings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #246
What
Validated all 22
systemnamespace blueprints against a Kestra EE v2.0.0-rc1 instance and fixed every validation error. After this change, all 22 flows validate (kestractl flows validate) and deploy (kestractl flows deploy) cleanly — verified on a live 2.0.0-rc1 instance.Changes
conditions→statesfailure-alert-discord,failure-alert-email,failure-alert-gmail,failure-alert-sentry-1,failure-alert-slack,failure-alert-teams,failure-alert-zendutyconditions(ExecutionStatus + ExecutionNamespace prefix) →states+ `when: "{{ flow.namespace \forcedfrompluginDefaults(removed in 2.0)copy-flows-to-new-tenant,k8s-namespace-logs-and-eventsio.kestra.plugin.core.flow.ForEach→io.kestra.plugin.core.flow.Loopk8s-namespace-logs-and-eventsexpiredOnly→behavior: {type: key, expiredOnly: true}on PurgeKVkv-store-purge{{ secret('...') }}instead of plain-text placeholders (fixes v2 validation warnings)push-to-git,sync-from-git,failure-alert-email,create-hubspot-ticket-on-failure,create-linear-issue-on-failureRemaining warnings (intentional)
The 7 unscoped failure-alert blueprints still emit "This flow will be triggered for EVERY execution of EVERY flow on your instance" — that is the documented purpose of those blueprints (instance-wide alerting in one place), so behavior was kept and the warning is informational.
Validation evidence
Note: the
extend:block is blueprint-index metadata and is rejected by the server API — it was stripped before validate/deploy, as the blueprint indexer does.when: "{{ flow.namespace | startsWith(...) }}"pattern on the Flow trigger.